//
//  ChangePasswordFootView.m
//  项目二
//
//  Created by rimi1 on 2016/11/7.
//  Copyright © 2016年 Wangxingqian. All rights reserved.
//

#import "ChangePasswordFootView.h"

static NSInteger spacing_ = 20;

@implementation ChangePasswordFootView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.sureChange];
    }
    return self;
}

#pragma mark - respondsTo..

- (void)respondsToSureChange:(UIButton *)sender {
    if (self.changeBlock) {
        self.changeBlock();
    }
}

#pragma mark - get

- (UIButton *)sureChange {
    
    if (!_sureChange) {
        
        CGFloat spacing = WXQAdaptionWidth(spacing_/2);
        _sureChange = [[UIButton alloc] initWithFrame:CGRectMake(spacing, WXQAdaptionHeight(spacing_ * 2.5), kWIDTH - spacing * 2, WXQAdaptionHeight(50))];
        _sureChange.backgroundColor = [UIColor orangeColor];
        [_sureChange setTitle:@"确认修改" forState:UIControlStateNormal];
        _sureChange.layer.cornerRadius = 5;
        [_sureChange addTarget:self action:@selector(respondsToSureChange:) forControlEvents:UIControlEventTouchUpInside];
        
    }
    return _sureChange;
}

@end











